package refparam;

public class PlayerMonster {
	public static void main(String[] args) {
		Player p = new Player();
		p.blood = 50;
		p.name = "战神";
		
		Monster m = new Monster();
		m.type = "哥布林";
		m.blood = 50;
		
		while (true) {
			p.beatMonster(m);
			if (m.blood <= 0) {
				System.out.println(p.name + "赢了");
				break;
			}
			m.beatPlayer(p);
			if (p.blood <= 0) {
				System.out.println(m.type + "赢了");
				break;
			}
		}
	}
}
